package cn.wsalix.weixin.service;

import cn.wsalix.admin.entity.SysUser;
import cn.wsalix.login.form.WxCodeForm;
import cn.wsalix.weixin.entity.WxConfig;
import cn.wsalix.weixin.entity.WxMessage;
import cn.wsalix.weixin.req.entity.ImageReqMsg;
import cn.wsalix.weixin.req.entity.LinkReqMsg;
import cn.wsalix.weixin.req.entity.LocationReqMsg;
import cn.wsalix.weixin.req.entity.QrCodeEvent;
import cn.wsalix.weixin.req.entity.TextReqMsg;
import cn.wsalix.weixin.req.entity.VoiceReqMsg;

public interface WxService{
	public WxMessage saveWxMessage(WxMessage wxMessage);

	void saveTextReqMsg(TextReqMsg textReqMsg);

	void saveImageReqMsg(ImageReqMsg imageReqMsg);

	void saveVoiceReqMsg(VoiceReqMsg voiceReqMsg);

	void saveQrCodeEvent(QrCodeEvent qrCodeEvent);

	void saveLocationReqMsg(LocationReqMsg qrCodeEvent);

	void saveLinkReqMsg(LinkReqMsg qrCodeEvent);

	/**
	 * @see https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842&token=&lang=zh_CN
	 * @param wxConfigId
	 * @param backUrl回调地址
	 * @return 微信auth认证
	 */
	public String oauth2(WxConfig wxConfigId,String backUrl);

	public SysUser register(WxConfig wxConfigId,WxCodeForm form);

}
